
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:record/src/page/homeTab/home/HomePage.dart';
import 'package:record/src/page/homeTab/home/bill.dart';
import 'package:record/src/page/homeTab/home/my.dart';


class Home extends StatefulWidget{
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return HomeState();
  }
}

class HomeState extends State with TickerProviderStateMixin{
  TabController controller;
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    this.controller = new TabController(length: 3, vsync: this);
  }
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      bottomNavigationBar: Container(
        width: MediaQuery.of(context).size.width,
        height: 44,
        child: TabBar(
          controller: this.controller,
          tabs: <Widget>[
            Tab(child: Text("首页"),),
            Tab(child: Text("账单"),),
            Tab(child: Text("我的"),)
          ],
          indicatorSize: TabBarIndicatorSize.label,
          indicatorColor: Color.fromRGBO(255, 255, 255,1),
          unselectedLabelColor:Color.fromRGBO(153, 153, 153, 1) ,
          labelColor:Color.fromRGBO(6, 193, 134,1),
        ),
        decoration: new BoxDecoration(
          border:Border(
            top: BorderSide(width: 0.5,color: Color.fromRGBO(153, 153, 153, 1)),
          )
        ),
      ),
      body: TabBarView(children:[
        HomePage(),
        Bill(),
        My()
      ],
      controller:this.controller,),
    );
  }
}